package com.ihc.android.datasource;

public class QuestionQuiz {
	
	private long id;
	private Question question;
	private Quiz quiz;
	
	public QuestionQuiz() {
	}
	
	public QuestionQuiz(long id, Question question, Quiz quiz) {
		this.id = id;
		this.question = question;
		this.quiz = quiz;
	}
	
	public long getId() {
		return id;
	}
	
	public void setId(long id) {
		this.id = id;
	}
	
	public Question getQuestion() {
		return question;
	}
	
	public void setQuestion(Question question) {
		this.question = question;
	}
	
	public Quiz getQuiz() {
		return quiz;
	}
	
	public void setQuiz(Quiz quiz) {
		this.quiz = quiz;
	}
	
	@Override
	public String toString() {
		if (this.question != null) {
			return this.question.getDescription();
		} else {
			return Long.toString(this.getId());
		}
	}
}
